<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<link rel="stylesheet" href="../../../styles/index.css">
	<style>
		.box {
			width: 400px;
			display: flex;
			border: solid 1px crimson;
			box-sizing: border-box;
			margin: 10px 0;
		}

		.box>div {
			width: 100px;
			height: 100px;
			background-color: skyblue;
			margin: 2px;
		}

		.box2>div:nth-child(1) {
			/*  不伸缩，按照弹性元素本身的宽高来定 */
			flex-shrink: 0;
		}

		.box2>div:nth-child(2) {
			/* 伸缩5倍 */
			flex-shrink: 5;
		}

		.box2>div:nth-child(3) {
			flex-shrink: 3;
		}

		.box2>div:nth-child(4) {
			flex-shrink: 4;
		}

		.box2>div:nth-child(5) {
			flex-shrink: 5;
		}
	</style>
</head>

<body>
	<div class="container flex direction-column">
		<span>默认值为1，即如果空间不足，该项目将缩小</span>
		<div class="box">
			<div>box1</div>
			<div>box2</div>
			<div>box3</div>
			<div>box4</div>
			<div>box5</div>
		</div>

		<span>手动指定某个弹性元素要缩小多少倍，值越大，缩小倍数越大</span>
		<div class="box box2">
			<div>box1</div>
			<div>box2</div>
			<div>box3</div>
			<div>box4</div>
			<div>box5</div>
		</div>
	</div>
</body>

</html>